﻿using System;

namespace HealthCommunity
{
	public partial class MaterialEdit : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			var permited = false;

			var u = SiteContext.Current.CurrentUser;

			if (u != null && u.Role != null)
			{
				permited = u.Role.RoleName.ToLower().Equals("storeadmin") || u.Role.RoleName.ToLower().Equals("storemanager") || u.Role.RoleName.ToLower().Equals("admin");
			}

			if (!permited)
			{
				Server.Transfer("~/MaterialList.aspx");
			}
		}
	}
}